﻿<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>

<script language="VB" runat="server">

    Protected Sub PROCESSING(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Try
            If NOT IsNothing(HttpContext.Current.Session("spam")) Then
                If RadioButtonList1.Items(0).Selected Then
                    Dim ID As Integer _
                            = HttpContext.Current.Session("spam")
                    Dim cmd2 As New OleDbCommand()
                    cmd2.Connection = global_asax.conn1
                    Dim query As String = String.Concat("UPDATE ALL_RSS SET ABS=", True, " WHERE ID=", Integer.Parse(ID), "")
                    cmd2.CommandText = query
                    cmd2.ExecuteNonQuery()
                    HttpContext.Current.Session("spam") = Nothing 
                End If
            End If
            If NOT IsNothing(HttpContext.Current.Session("ADULT")) Then
                If RadioButtonList1.Items(0).Selected Then
                    Dim ID As Integer _
                            = HttpContext.Current.Session("ADULT")
                    Dim cmd2 As New OleDbCommand()
                    cmd2.Connection = global_asax.conn1
                    Dim query As String = String.Concat("UPDATE ALL_RSS SET ADL=", True, " WHERE ID=", Integer.Parse(ID), "")
                    cmd2.CommandText = query
                    cmd2.ExecuteNonQuery()
                    HttpContext.Current.Session("ADULT") = Nothing 
                End If
            End If
            If NOT IsNothing(HttpContext.Current.Session("NOTADULT")) Then
                If RadioButtonList1.Items(0).Selected Then
                    Dim ID As Integer _
                            = HttpContext.Current.Session("NOTADULT")
                    Dim cmd2 As New OleDbCommand()
                    cmd2.Connection = global_asax.conn1
                    Dim query As String = String.Concat("UPDATE ALL_RSS SET ADL=", False, " WHERE ID=", Integer.Parse(ID), "")
                    cmd2.CommandText = query
                    cmd2.ExecuteNonQuery()
                    HttpContext.Current.Session("NOTADULT") = Nothing 
                End If
            End If
        Catch ex As Exception
        End Try
        Response.Redirect("Default.aspx")
    End Sub
    
</script>

<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:Panel ID="Panel1" runat="server" BackColor="#FF9999" BorderStyle="Solid" 
    Height="400px">
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Bold="True" 
        Font-Size="Large" Height="107px" Width="320px">
        <asp:ListItem Selected="True">I am absolutely sure of it!</asp:ListItem>
        <asp:ListItem>Possibly...</asp:ListItem>
    </asp:RadioButtonList>
    <asp:Button ID="Button2" runat="server" Font-Bold="True" Font-Size="X-Large" 
        Height="56px" Text="Send!" Width="177px" />
</asp:Panel>
<p>
</p>
</asp:Content>

